package main

import (
	"fmt"
	"os"

	"gitee.com/firewing_group/test/mid"
	"gitee.com/firewing_group/test/router"

	"github.com/labstack/echo"
)

func main() {

	// Echo instance
	e := echo.New()
	// Middleware
	e.Use(mid.SuperCtx(mid.DefaultLoggerConfig))
	e.Use(mid.RecoverMid)

	{
		router.Start(e)
	}
	serve(e)
}

func serve(e *echo.Echo) {
	err := e.Start(os.Getenv("bind"))
	fmt.Println("serve:", err)
}
